package com.lab.account.service;

import java.util.List;

import org.springframework.security.core.userdetails.UsernameNotFoundException;

import com.common.service.GenericManager;
import com.common.service.NoSuchUserException;
import com.common.service.ServiceException;
import com.lab.account.domain.Role;
import com.lab.account.domain.User;

public interface UserManager extends GenericManager<User, Long> {

	User login(User user) throws NoSuchUserException;

	User getByUsername(String username) throws UsernameNotFoundException;

	boolean isUsernameUnique(String newLoginName, String oldLoginName);

	List<Role> getRoleList() throws ServiceException;

	List<User> getByPassword(String password) throws NoSuchUserException;

}